
#pragma once

#include "base/core/singleton.h"
#include "Common/TableDefine.h"


class TreasureAdventureCfg : public ManualSingleton <TreasureAdventureCfg>
{
	friend ManualSingleton <TreasureAdventureCfg>;
public:
	TreasureAdventureCfg();
	~TreasureAdventureCfg();
	bool Init(const char *szCfgFile, const char *szSplitChar);
	bool UnInit();
	void Clear();
	const TreasureAdventureCfgInfo *GetTreasureAdventureCfgInfo(int32_t id);
	const TreasureAdventureCfgMap *GetTreasureAdventureCfgMap() { return &m_TreasureAdventureCfgMap; }
private:
	TreasureAdventureCfgMap m_TreasureAdventureCfgMap;
};

#define  g_MakeTreasureAdventureCfgTable() (TreasureAdventureCfg::Instance())
#define  g_GetTreasureAdventureCfgTable() (TreasureAdventureCfg::GetInstance())
#define  g_DelTreasureAdventureCfgTable() (TreasureAdventureCfg::Destroy())